// pages/detail/detail.js
Page({
  /**
   * 页面的初始数据
   */
  data: {},
  onLoad() {
    // 获取当前的页面栈
    const pageStacks = getCurrentPages();
    const currentPage = pageStacks[pageStacks.length - 1];
    console.log(currentPage.route);
  },
  goBack() {
    wx.navigateBack({
      delta: 10,
    });
  },
});
